<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="bjui-pageContent">
	<c:if test="${empty info.id}">
	<form action="<%=request.getContextPath()%>/t/modulePrivilege/insert.do" data-toggle="validate" data-reload-navtab="true">
	</c:if>
	<c:if test="${not empty info.id}">
	<form action="<%=request.getContextPath()%>/t/modulePrivilege/update.do" data-toggle="validate" data-reload-navtab="true">
		<input type="hidden" name="id" value="${info.id}">
	</c:if>
        <div class="pageFormContent" data-layout-h="0">
            <table class="table table-condensed table-hover" width="100%">
                <tbody>
					<tr>
						 <td colspan="2">
	                        <label class="control-label x100">模块编号：</label>
	                        <input type="text" name="modCode" value="${info.modCode}" size="60">
	                    </td>
		    		</tr>
					<tr>
						 <td colspan="2">
	                        <label class="control-label x100">权限编号：</label>
	                        <input type="text" name="priCode" value="${info.priCode}" size="60">
	                    </td>
		    		</tr>
                </tbody>
            </table>
        </div>
        <div style="display:inline-block; vertical-align:middle;">
		    <div id="doc_pic_up" data-toggle="upload" data-uploader="<%=request.getContextPath()%>/t/modulePrivilege/springUpload.do"
		        data-file-size-limit="1024000000"
		        data-file-type-exts="*.jpg;*.png;*.gif;*.mpg"
		        data-multi="true"
		        data-on-upload-success="doc_upload_success"
		        data-icon="cloud-upload"></div>
		    <input type="hidden" name="doc.pic" value="" id="doc_pic">
		</div>
		<span id="doc_span_pic"></span>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
        <li><button type="submit" class="btn-default" data-icon="save">保存</button></li>
    </ul>
</div>
<script type="text/javascript">
    function doc_upload_success(file, data) {
        var json = $.parseJSON(data);
        $(this).bjuiajax('ajaxDone', json);
        if (json[BJUI.keys.statusCode] == BJUI.statusCode.ok) {
            $('#doc_pic').val(json.filename);
            $('#doc_span_pic').html('已上传图片：<img src="'+json.filename +'" width="100">');
        }
    }
</script>